package com.party.core.dao.read.analysis;

import com.party.common.paging.Page;
import com.party.core.dao.read.BaseReadDao;
import com.party.core.model.analysis.StatisticsEvent;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @program: party-temp
 * @description: 统计事件数据读取
 * @author: Huaqunhao
 * @create: 2018-08-01 10:53
 **/
@Repository
public interface StatisticsEventReadDao extends BaseReadDao<StatisticsEvent> {
    StatisticsEvent getByCode(@Param("code") String code);

    StatisticsEvent getEvent(StatisticsEvent statisticsEvent);

    List<StatisticsEvent> queryEventList();

    /**
     * 统计网页端事件当天的事件流程数据
     *
     * @param map 请求参数
     * @return 统计结果
     */
    List<StatisticsEvent> countList(@Param("params") Map<String, Object> map);

    List<StatisticsEvent> webListPage(@Param("event") StatisticsEvent statisticsEvent,
                                      @Param("params") Map<String, Object> params, Page page);

    Long getEventNum(@Param("eventId") String eventId, @Param("params") Map<String, Object> params);

    List<StatisticsEvent> listPageByOthers(@Param("eventCount") StatisticsEvent eventCount,
                                           @Param("params") Map<String, Object> params, Page page);

    List<StatisticsEvent> listPageByOrgIds(@Param("eventCount") StatisticsEvent eventCount,
                                           @Param("params") Map<String, Object> params, Page page);
}
